import request from '@/axios';

export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const listByProd = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/listByProd',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const listByStock = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/listByStock',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const listByAsn = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/listByAsn',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const listByCn = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/listByCn',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const listByFcl = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/listByFcl',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const listByLogistics = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/listByLogistics',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}


export const findList = (params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/findList',
        method: 'get',
        params: {
            ...params,
        }
    })
}

export const getDetail = (id) => {
  return request({
    url: '/api/blade-/anwise/order/order_item/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/blade-/anwise/order/order_item/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/blade-/anwise/order/order_item/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-/anwise/order/order_item/submit',
    method: 'post',
    data: row
  })
}


export const updateDeliComplete = (row) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/updateDeliComplete',
        method: 'post',
        data: row
    })
}

export const updateProdComplete = (row) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/updateProdComplete',
        method: 'post',
        data: row
    })
}


export const orderTracking = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/orderTracking',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const orderDetails = (current, size, params) => {
    return request({
        url: '/api/blade-/anwise/order/order_item/orderDetails',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

